package com.yykj.common.enums;

import lombok.Getter;

/**
 * Created by chendg on 2018/1/8 0008.
 */
@Getter
public enum ResultEnums {

    PARAM_ERROR(1000, "参数错误"),
    HEAD_TOKEN_NOT_EXIST_ERROR(1002, "请在请求头加上token"),
    HEAD_TOKEN_ERROR(1003, "token已过期"),
    PARAM_ERROR_DATE(1004, "日期格式不正确"),
    PARAM_ERROR_JSON_FORMAT(1005, "json 转换失败"),
    REQUEST_FAIL(1006, "请求失败"),
    LOGIN_FAIL(1007, "用户名或者密码不正确"),
    CODE_LOGIN_FAIL(1107, "验证码不正确 请重新输入"),
    PASSWORD_LENGTH_ERROR(1108, "密码位数不足8-20位"),
    CODE_NOT_EXPIRE(1109, "验证码未失效，请勿重复获取"),

    REGISTER_FAIL(1008, "用户名称已经存在"),
    RE_PASSWORD_ERROR(1009, "两次密码不一致"),
    OLD_PASSWORD_ERROR(1010, "原密码不正确"),
    PASSWORD_ERROR(1209, "密码不正确"),
    NOT_EXIST(1011, "记录不存在"),
    MENU_HAS_CHILD_MENU(1211, "父级菜单还有子菜单"),
    FIELD_EXIST_ERROR(1212, "该字段已经存在"),
    COMMON_FIELD_EXIST_ERROR(1213, "与通用字段冲突"),
    DEPARTMENT_NAME_EXIST_ERROR(1214, "该科室名称已经存在"),
    ALL_READY_EXIST(1012, "记录已经存在"),
    ROLE_DELETE_ERROR(1013, "该角色正在使用"),
    ADMIN_BIND_ERROR(1014, "用户已经绑定"),
    NOT_LOGIN(1015, "未登录"),
    REDIS_LOCK_ERROR(1016, "上锁失败"),


    NOT_ENOUGH_SCHEDULING(1017, "没有足够的号源"),
    HOSPITAL_SECLUDING_NOT_SET(1018, "医院班次未设置"),
    HOSPITAL_SECLUDING_NOT_EXIST(1019, "医院没有该排班或者已经禁用"),
    NO_HOSPITALID(1020, "请选择医院或传入医院ID"),

    NO_MOBILE_ERROR(1021, "请输入手机号"),
    MOBILE_USED_ERROR(1121, "该手机号已经注册"),
    NO_CODE_ERROR(1022, "请输入验证码"),
    NO_TOKEN_ERROR(1023, "请传入TOKEN"),
    NO_GETCODE_ERROR(1024, "验证码失效"),

    NO_WXCODE_ERROR(1025, "请传入CODE"),
    NO_OPENID_ERROR(1026, "请传入openid"),
    NO_NICKNAME_ERROR(1027, "请传入nickName"),
    NO_AVATAR_ERROR(1028, "请传入avatar"),
    REGISTERED_ERROR(1029, "您已注册过"),
    NO_REGISTERED_ERROR(1030, "您未注册"),
    NO_IDCARD_ERROR(1031, "请输入身份证号"),
    NO_PATIENTNAME_ERROR(1032, "请输入姓名"),
    NO_RELATION_ERROR(1033, "请选择与本人关系"),
    LIMIT_PATIENT_CARD_ERROR(1034, "已达到就诊卡绑定上限"),
    HAS_RELATION_ERROR(1035, "您的帐号下此关系已存在"),
    IDCARD_BINDING_ERROR(1036, "该身份证号已被绑定"),
    REALNAME_APPCODE_ERROR(1037, "实名认证，AppCode错误"),
    REALNAME_PATH_ERROR(1038, "请求的 Method、Path 或者环境错误"),
    REALNAME_PARAM_ERROR(1039, "实名认证,参数错误"),
    REALNAME_URL_ERROR(1040, "服务未被授权（或URL和Path不正确）"),
    REALNAME_NO_MONEY_ERROR(1041, "套餐包次数用完"),
    REALNAME_OTHER_ERROR(1042, "套餐包次数用完"),
    REALNAME_URL_FORMAT_ERROR(1043, "URL格式错误"),
    REALNAME_URL_PATH_ERROR(1044, "URL地址错误"),
    LIMIT_APPONTMENT_ERROR(1045, "该诊号一天可预约科室已达到上限"),
    LIMIT_APPONTMENT_DEPT_ERROR(1045, "该科室预约已达到上限"),
    LIMIT_WEEK_ERROR(1046, "您已超过一周内预约上限"),
    LIMIT_DATE_ERROR(1047, "您已超过可预约时间"),
    NO_ACCOUNT_ERROR(1048, "无法找到用户"),
    NO_ORDER_ERROR(1049, "此订单不存在"),
    ORDER_ABNORMAL(1050, "订单状态异常"),
    ORDER_FAILED(1051, "调用统一下单接口,失败！"),
    NO_EXIST_ORDERNO_ERROR(1052, "订单号不存在"),
    CREATE_ACCOUNT_ERROR(1056, "创建tencent账号异常"),
    REQUEST_URL_ERROR(1057, "请求远程URL异常"),
    NOTIFY_MESSAGE_ERROR(1058, "通知发送失败"),
    TENCENT_USER_INFO_ERROR(1059, "获取用户信息失败"),
    NO_EXIST_ERROR(1060, "您的预约挂号订单不存在"),
    NO_TICKET_ERROR(1061, "已无号源，请另约时间"),
    PUSH_PURCHASE_FAILED(1062, "抢购失败"),
    REGISTER_FAILED(1063, "注册失败"),
    TENCENT_ACCOUNT_CREATE_ERROR(1064, "腾讯账号创建失败"),
    TENCENT_ACCOUNT_USER_SIGN_ERROR(1064, "腾讯User Sign获取失败"),
    EXITS_GROUP_ERROR(1065, "该分组或标签已经存在"),
    NO_GROUP_ERROR(1066, "请传入分组或标签"),

    NO_UPDATE_DEFAULT_ERROR(1067, "默认分组不允许被修改"),
    NO_DELETE_DEFAULT_ERROR(1068, "默认分组不允许被删除"),
    ORDER_ERROR(1069, "统一下单接口失败"),
    PATIENTCARD_ERROR(1070, "就诊卡不存在"),
    MOBILE_NOT_REGISTER(1071, "该手机号不存在"),
    HAS_UNFINISHED_ORDER_ERROR(1071, "您与该医生有未结束的订单"),
    HAS_FINISHED_ORDER_ERROR(1072, "该问诊订单已经结束"),
    IDCARD_ERROR(1073, "身份证信息不正确"),
    ORDER_STATUS_ERROR(1074, "该订单不在问诊中"),

    TRAIN_TYPE_ERROR(1201,"该类型还在使用中"),
    TRAIN_DETAIL_NAME_EXIST(1202,"该名称已经存在"),

    TEMP_GENERATE_ERROR(1203,"模板生成失败"),

    PRESCRIPTION_CHECK_ROLE_ERROR(1204,"角色不正确"),
    DOCTOR_QR_CODE_ERROR(1205,"医生二维码生成失败"),

    TASK_NOT_EXIST(2000, "任务不存在"),
    TASK_DATA_ERROR(2001, "任务数据错误"),
    LOGIN_NOT(2002, "未登录"),
    UPLOAD_ERROR(2004, "上传文件错误 "),
    WX_OPENID_ERROR(2005, "微信openid获取失败"),
    NOT_ENOUGH_BALANCE(2006, "余额不足"),
    CASH_FEE_SET_ERROR(2100,"提现手续费设置错误"),
    CASH_FEE_CALC_ERROR(2101,"提现手续费计算错误"),
    CASH_AMOUNT_ERROR(2102,"提现金额超过限制"),
    BANK_CARD_NOT_BIND_ERROR(2100,"银行卡未绑定"),
    BANK_CARD_ALREADY_BIND_ERROR(2103,"银行卡已经绑定，无需多次绑定"),
    BANK_CARD_VERIFY_ERROR(2101,"银行卡实名认证失败"),
    DOCTOR_ID_CARD_NO_NOT_EXIST(2102,"未设置身份证号"),
    DOCTOR_BANK_CARD_BIND_ERROR(2104,"银行卡绑定失败"),
    BANK_CARD_TYPE_ERROR(2105,"银行卡必须是借记卡"),
    BANK_NOT_MATCH_ERROR(2106,"银行卡名称不匹配"),
    PAY_PASSWORD_MAX_FAIL_CNT_ERROR(2107,"支付密码输错次数限制"),
    PAY_PASSWORD_NOT_SET_ERROR(2108,"支付密码未设置"),
    MAX_PRICE_ERROR(2007, "价格超限"),
    MIN_PRICE_ERROR(2008, "价格超限"),
    IMAGE_MERGE_ERROR(2109,"图片生成失败 "),
    TRAIN_VALUE_NOT_SET_ERROR(2200,"必输值没有设置 "),
    _2209(2009, "医生问诊次数不足,请重试"),
    _2210(2210, "医生不存在"),
    _2211(2211, "患者不存在"),
    _2212(2212, "请在约定的时间内接诊"),
    _2213(2013, "诊次数失败,请重试"),
    REPAIR_TYPE_ERROR(3001, "分数不能为空"),

    // 校验相关
    AUTHORIZE_PARAM_ERROR(8001, "校验参数不正确"),
    AUTHORIZE_APP_KEY_ERROR(8002, "未注册的AppKey"),
    AUTHORIZE_CHECKSUM_ERROR(8002, "检验CheckSum失败"),
    AUTHORIZE_TIME_ERROR(8003, "curTime时间不正确"),

    // 系统相关
    SYSTEM_NOT_FOUND_ERROR(404, "不存在的URL"),
    SYSTEM_ERROR(500, "系统异常"),
    SYSTEM_CONFIG_ERROR(600, "系统配置不存在"),
    SYSTEM_FREQUENCY_LIMIT_ERROR(700, "请勿多次重复请求"),
    MD5_ERROR(800, "md5计算失败"),
    FILE_NOT_EXIST(900, "文件不存在"),
    FILE_READ_ERROR(901, "文件读取错误"),
    ;

    private final Integer code;

    private final String message;

    ResultEnums(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
